'use strict';

angular.module('app')
	.controller('adjustAccController', [ '$rootScope', '$scope', '$http', '$state',
	                                function($rootScope, $scope, $http, $state) {
		$scope.title = '调账';
        $scope.param = { };
        $scope.loading = true;
        
        $scope.submit= function(){
            $scope.loading = true;
        	$.ajax({
				url : $scope.app.project_name + '/upload/imageData',
				data: {fileData:$scope.myCroppedImage}
			}).then(function(result){
                    if(result && result.httpCode ==200){//成功
                        $scope.record['avatar'] =result.imgName[0];
                        saveData();
                    }else if(result && result.httpCode ==400){
                        saveData();
                    }
                });
        };
} ]);